package cz.muni.fi.pa165.rentalofconstructionmachinery.service;

import cz.muni.fi.pa165.rentalofconstructionmachinery.dto.MachineDTO;
import java.util.List;

/**
 *
 * @author Zuzana Krejcova
 */
public interface MachineService {
    
    /*
     * Creates a new machine. Machine and it's license plate cannot be null.
     * @param machine A machine to be created.
     */
    public void addMachine(MachineDTO machine);
    
    /**
     * Lists all machines.
     * @return List of all machines
     */
    public List<MachineDTO> listMachines();
    
    /**
     * Searches for a machine by it's license plate.
     * @param plate License plate to search by
     * @return Machine with the specified license plate or null, if there is none like that
     */
    public MachineDTO searchForMachineByPlate(String plate);
    
    /**
     * Searches for a machine by it's ID.
     * @param id ID to look for
     * @return Machine with the specified ID
     */
    public MachineDTO searchForMachineById(Long id);
    
    /**
     * Removes a machine. The machine cannot be null.
     * @param machine Machine to remove
     */
    public void removeMachine(MachineDTO machine);
    
    /**
     * Modifies a machine. The machine cannot be null.
     * @param machine Machine to modify
     */
    public void modifyMachine(MachineDTO machine);
    
}
